package cn.janescott.inner.space.admin;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by Scott on 2018/7/24
 */
@RestController
@RequestMapping("/demo")
public class DemoController implements ApplicationContextAware {

    private ApplicationContext applicationContext;

    @RequestMapping("/test")
    public void test(HttpServletRequest request, HttpServletResponse response) {

    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
    }
}
